Skip to content

fix(laptop-backups): watchdog covers cold-store-nightly with completion evidence (#9093 step 1) - #10988

Merged
dezren39 merged 2 commits into
mainfrom
queue/20293-9093-backup-hardening
Nov 17, 2026
Merged

dezren39 merged 2 commits into
mainfrom
queue/20293-9093-backup-hardening

Conversation

@dezren39

@dezren39 dezren39 commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

What

Step 1 of #9093 (backup-mesh hardening): the #1841 freshness watchdog now covers the cold-store-nightly leg, so the next silent failure of the every-DB Turso export gets named instead of discovered by audit.

The watchdog previously watched only dashboard and repo-archive. This adds a cold-store job:

  • Timer check (as for repo-archive): cold-store-nightly.timer last trigger within the threshold.
  • Completion evidence (new check (e)): the service's last Result must be success AND the cold-store manifest's transfer_ledger must hold a fresh backup-upload row (export-turso files one per exported database). A timer trigger alone cannot see the 2026-11-12 failure shape: the timer fired and the service started, but the 30-minute start timeout killed the export mid-flight, filing 2 of 42 databases.
  • The nix module passes cold-store in the watchdog job set whenever coldStoreNightly.enable is on.

Diagnosis recorded on #9093 (task 20293)

  • The 2026-11-12 failure's step was export-turso, killed by the service's 30-minute start timeout; root causes were the timeout itself and ~30 GB of accumulated export scratch. Both were fixed 2026-11-11: TimeoutStartSec 30m → 120m (d3fa454) and per-database scratch bounding (b4278bc). The fix reached the running system after 2026-11-12; the 2026-11-15 and 2026-11-16 runs each filed 42/42 databases (manifest transfer-ledger evidence) and the service's last Result is success.
  • Turso Delete Protection is now ON for all 42 fleet databases (enabled + verified per-DB during the task; no exceptions).
  • The ~/backups/restic/laptop-state/ repo is not orphaned: its writer is laptop-state-backup.timer/.service (code#1849), last run 2026-11-16 05:52 CST with a fresh snapshot + success stamp.

Tests

  • laptop-backups-watchdog.test.sh: all scenarios pass, including 6 new cold-store ones (fresh, stale ledger, failed result, missing manifest, stale timer, not-in-default-set).
  • Live run of the patched watchdog on the laptop: laptop-backups-watchdog: OK jobs [dashboard,repo-archive,cold-store] fresh within 26h (exit 0).

Deployment rides the normal nixos-rebuild from this repo's module, same as every laptop-backups change.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 requested a review from a team as a code owner November 17, 2026 05:06
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-17T05:06:22.357321Z
We couldn’t complete this review. Comment @codex review to try again.
4e2a45e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 8 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d9ab9d43-c599-48c7-a292-d4343aaf25de
Commits

Reviewing files that changed from the base of the PR and between d0cfaf9 and 7a6208a.

Files selected for processing: 3

  • nixos/home/laptop-backups-watchdog.sh
  • nixos/home/laptop-backups-watchdog.test.sh
  • nixos/home/laptop-backups.nix
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

…up-hardening

# Conflicts:
#	nixos/home/laptop-backups-watchdog.sh
#	nixos/home/laptop-backups-watchdog.test.sh
#	nixos/home/laptop-backups.nix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

audit:complete PR fully implemented spawning issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants